home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / AIncludes / QD3DGroup.a < prev    next >
Encoding:
Text File  |  1998-04-09  |  13.4 KB  |  462 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DGroup.a
  3. ;
  4. ;    Contains:    Q3Group methods        
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    QuickTime 3.0
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__QD3DGROUP__') = 'UNDEFINED' THEN
  19. __QD3DGROUP__ SET 1
  20.  
  21.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  22.     include 'QD3D.a'
  23.     ENDIF
  24.  
  25. ; ******************************************************************************
  26. ; **                                                                             **
  27. ; **                            Group Typedefs                                     **
  28. ; **                                                                             **
  29. ; ****************************************************************************
  30.  
  31. ; * These flags affect how a group is traversed
  32. ; * They apply to when a group is "drawn", "picked", "bounded", "written"
  33.  
  34.  
  35. ; typedef long                            TQ3DisplayGroupStateMasks
  36. kQ3DisplayGroupStateNone        EQU        0
  37. kQ3DisplayGroupStateMaskIsDrawn    EQU        $01
  38. kQ3DisplayGroupStateMaskIsInline EQU    $02
  39. kQ3DisplayGroupStateMaskUseBoundingBox EQU $04
  40. kQ3DisplayGroupStateMaskUseBoundingSphere EQU $08
  41. kQ3DisplayGroupStateMaskIsPicked EQU    $10
  42. kQ3DisplayGroupStateMaskIsWritten EQU    $20
  43. ; typedef unsigned long                 TQ3DisplayGroupState
  44.  
  45. ; ******************************************************************************
  46. ; **                                                                             **
  47. ; **                    Group Routines (apply to all groups)                     **
  48. ; **                                                                             **
  49. ; ****************************************************************************
  50.  
  51. ;
  52. ; extern TQ3GroupObject Q3Group_New(void )
  53. ;
  54.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  55.         IMPORT_CFM_FUNCTION Q3Group_New
  56.     ENDIF
  57.  
  58. ;
  59. ; extern TQ3ObjectType Q3Group_GetType(TQ3GroupObject group)
  60. ;
  61.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  62.         IMPORT_CFM_FUNCTION Q3Group_GetType
  63.     ENDIF
  64.  
  65. ;
  66. ; extern TQ3GroupPosition Q3Group_AddObject(TQ3GroupObject group, TQ3Object object)
  67. ;
  68.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  69.         IMPORT_CFM_FUNCTION Q3Group_AddObject
  70.     ENDIF
  71.  
  72. ;
  73. ; extern TQ3GroupPosition Q3Group_AddObjectBefore(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  74. ;
  75.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  76.         IMPORT_CFM_FUNCTION Q3Group_AddObjectBefore
  77.     ENDIF
  78.  
  79. ;
  80. ; extern TQ3GroupPosition Q3Group_AddObjectAfter(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  81. ;
  82.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  83.         IMPORT_CFM_FUNCTION Q3Group_AddObjectAfter
  84.     ENDIF
  85.  
  86. ;
  87. ; extern TQ3Status Q3Group_GetPositionObject(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object *object)
  88. ;
  89.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  90.         IMPORT_CFM_FUNCTION Q3Group_GetPositionObject
  91.     ENDIF
  92.  
  93. ;
  94. ; extern TQ3Status Q3Group_SetPositionObject(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  95. ;
  96.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  97.         IMPORT_CFM_FUNCTION Q3Group_SetPositionObject
  98.     ENDIF
  99.  
  100. ;
  101. ; extern TQ3Object Q3Group_RemovePosition(TQ3GroupObject group, TQ3GroupPosition position)
  102. ;
  103.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  104.         IMPORT_CFM_FUNCTION Q3Group_RemovePosition
  105.     ENDIF
  106.  
  107. ;
  108. ; extern TQ3Status Q3Group_GetFirstPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  109. ;
  110.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  111.         IMPORT_CFM_FUNCTION Q3Group_GetFirstPosition
  112.     ENDIF
  113.  
  114. ;
  115. ; extern TQ3Status Q3Group_GetLastPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  116. ;
  117.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  118.         IMPORT_CFM_FUNCTION Q3Group_GetLastPosition
  119.     ENDIF
  120.  
  121. ;
  122. ; extern TQ3Status Q3Group_GetNextPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  123. ;
  124.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  125.         IMPORT_CFM_FUNCTION Q3Group_GetNextPosition
  126.     ENDIF
  127.  
  128. ;
  129. ; extern TQ3Status Q3Group_GetPreviousPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  130. ;
  131.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  132.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousPosition
  133.     ENDIF
  134.  
  135. ;
  136. ; extern TQ3Status Q3Group_CountObjects(TQ3GroupObject group, unsigned long *nObjects)
  137. ;
  138.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  139.         IMPORT_CFM_FUNCTION Q3Group_CountObjects
  140.     ENDIF
  141.  
  142. ;
  143. ; extern TQ3Status Q3Group_EmptyObjects(TQ3GroupObject group)
  144. ;
  145.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  146.         IMPORT_CFM_FUNCTION Q3Group_EmptyObjects
  147.     ENDIF
  148.  
  149. ; *     Typed Access
  150.  
  151. ;
  152. ; extern TQ3Status Q3Group_GetFirstPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  153. ;
  154.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  155.         IMPORT_CFM_FUNCTION Q3Group_GetFirstPositionOfType
  156.     ENDIF
  157.  
  158. ;
  159. ; extern TQ3Status Q3Group_GetLastPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  160. ;
  161.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  162.         IMPORT_CFM_FUNCTION Q3Group_GetLastPositionOfType
  163.     ENDIF
  164.  
  165. ;
  166. ; extern TQ3Status Q3Group_GetNextPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  167. ;
  168.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  169.         IMPORT_CFM_FUNCTION Q3Group_GetNextPositionOfType
  170.     ENDIF
  171.  
  172. ;
  173. ; extern TQ3Status Q3Group_GetPreviousPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  174. ;
  175.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  176.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousPositionOfType
  177.     ENDIF
  178.  
  179. ;
  180. ; extern TQ3Status Q3Group_CountObjectsOfType(TQ3GroupObject group, TQ3ObjectType isType, unsigned long *nObjects)
  181. ;
  182.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  183.         IMPORT_CFM_FUNCTION Q3Group_CountObjectsOfType
  184.     ENDIF
  185.  
  186. ;
  187. ; extern TQ3Status Q3Group_EmptyObjectsOfType(TQ3GroupObject group, TQ3ObjectType isType)
  188. ;
  189.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  190.         IMPORT_CFM_FUNCTION Q3Group_EmptyObjectsOfType
  191.     ENDIF
  192.  
  193. ; *    Determine position of objects in a group
  194.  
  195. ;
  196. ; extern TQ3Status Q3Group_GetFirstObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  197. ;
  198.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  199.         IMPORT_CFM_FUNCTION Q3Group_GetFirstObjectPosition
  200.     ENDIF
  201.  
  202. ;
  203. ; extern TQ3Status Q3Group_GetLastObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  204. ;
  205.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION Q3Group_GetLastObjectPosition
  207.     ENDIF
  208.  
  209. ;
  210. ; extern TQ3Status Q3Group_GetNextObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  213.         IMPORT_CFM_FUNCTION Q3Group_GetNextObjectPosition
  214.     ENDIF
  215.  
  216. ;
  217. ; extern TQ3Status Q3Group_GetPreviousObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  218. ;
  219.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  220.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousObjectPosition
  221.     ENDIF
  222.  
  223.  
  224. ; ******************************************************************************
  225. ; **                                                                             **
  226. ; **                            Group Subclasses                                 **
  227. ; **                                                                             **
  228. ; ****************************************************************************
  229.  
  230. ;
  231. ; extern TQ3GroupObject Q3LightGroup_New(void )
  232. ;
  233.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION Q3LightGroup_New
  235.     ENDIF
  236.  
  237. ;
  238. ; extern TQ3GroupObject Q3InfoGroup_New(void )
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  241.         IMPORT_CFM_FUNCTION Q3InfoGroup_New
  242.     ENDIF
  243.  
  244. ; ******************************************************************************
  245. ; **                                                                             **
  246. ; **                        Display Group Routines                                 **
  247. ; **                                                                             **
  248. ; ****************************************************************************
  249.  
  250. ;
  251. ; extern TQ3GroupObject Q3DisplayGroup_New(void )
  252. ;
  253.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  254.         IMPORT_CFM_FUNCTION Q3DisplayGroup_New
  255.     ENDIF
  256.  
  257. ;
  258. ; extern TQ3ObjectType Q3DisplayGroup_GetType(TQ3GroupObject group)
  259. ;
  260.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  261.         IMPORT_CFM_FUNCTION Q3DisplayGroup_GetType
  262.     ENDIF
  263.  
  264. ;
  265. ; extern TQ3Status Q3DisplayGroup_GetState(TQ3GroupObject group, TQ3DisplayGroupState *state)
  266. ;
  267.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION Q3DisplayGroup_GetState
  269.     ENDIF
  270.  
  271. ;
  272. ; extern TQ3Status Q3DisplayGroup_SetState(TQ3GroupObject group, TQ3DisplayGroupState state)
  273. ;
  274.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  275.         IMPORT_CFM_FUNCTION Q3DisplayGroup_SetState
  276.     ENDIF
  277.  
  278. ;
  279. ; extern TQ3Status Q3DisplayGroup_Submit(TQ3GroupObject group, TQ3ViewObject view)
  280. ;
  281.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  282.         IMPORT_CFM_FUNCTION Q3DisplayGroup_Submit
  283.     ENDIF
  284.  
  285. ; ******************************************************************************
  286. ; **                                                                             **
  287. ; **        Ordered Display Group                                                  **
  288. ; **                                                                             **
  289. ; **        Ordered display groups keep objects in order by the type of object:     **
  290. ; **                                                                             **
  291. ; **        1    kQ3ShapeTypeTransform                                             **
  292. ; **        2    kQ3ShapeTypeStyle                                                  **
  293. ; **        3    kQ3SetTypeAttribute                                                  **
  294. ; **        4    kQ3ShapeTypeShader                                                  **
  295. ; **        5    kQ3ShapeTypeCamera                                                  **
  296. ; **        6    kQ3ShapeTypeLight                                                  **
  297. ; **        7    kQ3ShapeTypeGeometry                                             **
  298. ; **        8    kQ3ShapeTypeGroup                                                 **            
  299. ; **        9    kQ3ShapeTypeUnknown                                                 **
  300. ; **                                                                             **
  301. ; **        Within a type, you are responsible for keeping things in order.         **
  302. ; **                                                                             **
  303. ; **        You may access and/or manipulate the group using the above types      **
  304. ; **        (fast), or you may use any parent or leaf class types (slower).         **
  305. ; **                                                                             **
  306. ; **        Additional types will be added as functionality grows.                 **
  307. ; **                                                                             **
  308. ; **        The group calls which access by type are much faster for ordered     ** 
  309. ; **        display group for the types above.                                     **
  310. ; **                                                                             **
  311. ; **        N.B. In QuickDraw 3D 1.0 Lights and Cameras are a no-op when drawn.     **
  312. ; **                                                                             **
  313. ; ****************************************************************************
  314.  
  315. ;
  316. ; extern TQ3GroupObject Q3OrderedDisplayGroup_New(void )
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  319.         IMPORT_CFM_FUNCTION Q3OrderedDisplayGroup_New
  320.     ENDIF
  321.  
  322. ; ******************************************************************************
  323. ; **                                                                             **
  324. ; **        IO Proxy Display Group                                                  **
  325. ; **                                                                             **
  326. ; **        IO Proxy display groups are used to place more than one              **
  327. ; **        representation of an object in a metafile. For example, if you know     **
  328. ; **        another program does not understand NURBPatches but does understand  **
  329. ; **        Meshes, you may place a mesh and a NURB Patch in an IO Proxy Group,  **
  330. ; **        and the reading program will select the desired representation.         **
  331. ; **                                                                             **
  332. ; **        Objects in an IO Proxy Display Group are placed in their preferencial**
  333. ; **        order, with the FIRST object being the MOST preferred, the LAST      **
  334. ; **        object the least preferred.                                             **
  335. ; **                                                                             **
  336. ; **        The behavior of an IO Proxy Display Group is that when drawn/picked/ **
  337. ; **        bounded, the first object in the group that is not "Unknown" is used,**
  338. ; **        and the other objects ignored.                                         **
  339. ; **                                                                             **
  340. ; ****************************************************************************
  341.  
  342. ;
  343. ; extern TQ3GroupObject Q3IOProxyDisplayGroup_New(void )
  344. ;
  345.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  346.         IMPORT_CFM_FUNCTION Q3IOProxyDisplayGroup_New
  347.     ENDIF
  348.  
  349. ; ******************************************************************************
  350. ; **                                                                             **
  351. ; **                        Group Extension Definitions                             **
  352. ; **                                                                             **
  353. ; ****************************************************************************
  354.  
  355. ; *    Searching methods - OPTIONAL
  356.  
  357.  
  358. kQ3XMethodType_GroupAcceptObject EQU    'gaco'
  359.  
  360. kQ3XMethodType_GroupAddObject    EQU        'gado'
  361.  
  362. kQ3XMethodType_GroupAddObjectBefore EQU    'gaob'
  363.  
  364. kQ3XMethodType_GroupAddObjectAfter EQU    'gaoa'
  365.  
  366. kQ3XMethodType_GroupSetPositionObject EQU 'gspo'
  367.  
  368. kQ3XMethodType_GroupRemovePosition EQU    'grmp'
  369. ; *    Searching methods - OPTIONAL - default uses above methods
  370.  
  371.  
  372. kQ3XMethodType_GroupGetFirstPositionOfType EQU 'gfrt'
  373.  
  374. kQ3XMethodType_GroupGetLastPositionOfType EQU 'glst'
  375.  
  376. kQ3XMethodType_GroupGetNextPositionOfType EQU 'gnxt'
  377.  
  378. kQ3XMethodType_GroupGetPrevPositionOfType EQU 'gpvt'
  379.  
  380. kQ3XMethodType_GroupCountObjectsOfType EQU 'gcnt'
  381.  
  382. kQ3XMethodType_GroupEmptyObjectsOfType EQU 'geot'
  383.  
  384. kQ3XMethodType_GroupGetFirstObjectPosition EQU 'gfop'
  385.  
  386. kQ3XMethodType_GroupGetLastObjectPosition EQU 'glop'
  387.  
  388. kQ3XMethodType_GroupGetNextObjectPosition EQU 'gnop'
  389.  
  390. kQ3XMethodType_GroupGetPrevObjectPosition EQU 'gpop'
  391. ; *    Group Position Methods
  392. ; *    
  393.  
  394.  
  395. kQ3XMethodType_GroupPositionSize EQU    'ggpz'
  396. ; typedef unsigned long                 TQ3XMethodTypeGroupPositionSize
  397.  
  398.  
  399. kQ3XMethodType_GroupPositionNew    EQU        'ggpn'
  400.  
  401. kQ3XMethodType_GroupPositionCopy EQU    'ggpc'
  402.  
  403. kQ3XMethodType_GroupPositionDelete EQU    'ggpd'
  404. ; *    View Drawing Helpers
  405. ; *    
  406. ; *    TQ3XGroupStartIterateMethod
  407. ; *
  408. ; *        Pass back *object = NULL to NOT call EndIterate iterate
  409. ; *        Pass back *object != NULL to draw object
  410. ; *         (other side will pass it to EndIterate for deletion!)
  411. ; *
  412. ; *        *iterator is uninitialized, use for iteration state. Caller should 
  413. ; *         ignore it.
  414. ; *    
  415. ; *    TQ3XGroupEndIterateMethod
  416. ; *    
  417. ; *        *object is previous object, dispose it or play with it.
  418. ; *        Pass back NULL when last iteration has occurred
  419. ; *        *iterator is previous value, use for iteration state Caller should 
  420. ; *        ignore it.
  421.  
  422.  
  423. kQ3XMethodType_GroupStartIterate EQU    'gstd'
  424.  
  425. kQ3XMethodType_GroupEndIterate    EQU        'gitd'
  426. ; *    IO  Helpers
  427. ; *    
  428. ; *    TQ3XGroupEndReadMethod
  429. ; *        Called when a group has been completely read. Group should perform
  430. ; *        validation and clean up any reading caches.
  431.  
  432.  
  433. kQ3XMethodType_GroupEndRead        EQU        'gerd'
  434. ;
  435. ; extern void *Q3XGroup_GetPositionPrivate(TQ3GroupObject group, TQ3GroupPosition position)
  436. ;
  437.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  438.         IMPORT_CFM_FUNCTION Q3XGroup_GetPositionPrivate
  439.     ENDIF
  440.  
  441.  
  442.  
  443.  
  444.     ENDIF ; __QD3DGROUP__ 
  445.  
  446.